
(defvar outline-mode-map nil "")

(if outline-mode-map nil (setq outline-mode-map (make-keymap)) (define-key outline-mode-map "}" (quote next-visible-heading)) (define-key outline-mode-map "{" (quote previous-visible-heading)) (define-key outline-mode-map "s" (quote show-children)) (define-key outline-mode-map "S" (quote show-subtree)) (define-key outline-mode-map "H" (quote hide-subtree)))

(defun outline-mode nil "Set major mode for editing outlines with selective display.
Headings should be lines starting with one or more asterisks.
Major headings have one asterisk, subheadings two, etc.
Lines not starting with asterisks are ordinary text.

You can make the text under a heading, or the subheadings
under a heading, temporarily invisible, or visible again.
Invisible lines are attached to the end of the previous line
so they go with it if you kill it and yank it back.

Commands:
Meta-}   next-visible-heading      move by visible headings
Meta-{   previous-visible-heading  move by visible headings

Meta-X hide-text	make all text invisible (not headings).
Meta-X show-all		make everything in buffer visible.

The remaining commands are used when dot is on a heading line.
They apply to some of the text or subheadings of that heading.
Meta-H   hide-subtree	make text and subheadings invisible.
Meta-S   show-subtree	make text and subheadings visible.
Meta-s   show-children	make direct subheadings visible.
		 No effect on text, or subheadings 2 or more levels down.
		 With arg N, affects subheadings N levels down.
hide-entry	make immediately following text invisible.
show-entry	make it visible.
hide-leaves	make text under heading and under its subheadings invisible.
		 The subheadings remain visible.
show-branches	make all subheadings at all levels visible." (interactive) (byte-code "ň� �	���
!�̉�͉���\"����!���!�4 	�4 �	!�" [selective-display t outline-mode-map mode-name major-mode nil local-abbrev-table text-mode-abbrev-table text-mode-syntax-table outline-mode-hook kill-all-local-variables use-local-map "Outline" outline-mode define-abbrev-table set-syntax-table boundp funcall] 13))

(defun outline-level nil (byte-code "�`��!�`Z[)�" [skip-chars-forward "^ 	"] 5))

(defun next-heading-preface nil (byte-code "���#� ��!b� ��h�>� ��!� ��" [nil re-search-forward "[
]\\*" move match-beginning 0 (10 13) forward-char -1] 7))

(defun next-heading nil "Move to the next heading line (a line starting with *'s)." (interactive) (byte-code "�����#� ��!Tb� ��" [nil re-search-forward "[
]\\*" move match-beginning 0] 5))

(defun next-visible-heading (arg) "Move to the next visible heading line (a line starting with *'s).
With argument, repeats or can move backward if negative." (interactive "p") (byte-code "���W� � � ��!���		$�� �" [arg nil 0 beginning-of-line forward-line 1 re-search-forward "^\\*"] 9))

(defun previous-visible-heading (arg) "Move to the previous heading line (a line starting with *'s).
With argument, repeats or can move forward if negative." (interactive "p") (byte-code "���V� � � ��!���		$�� �" [arg nil 0 beginning-of-line forward-line 1 re-search-backward "^\\*"] 9))

(defun flag-lines-in-region (from to flag) (byte-code "� Ŏ�	
�U� Ȃ �$))�" [modp from to flag buffer-modified-p ((byte-code "�!�" [modp set-buffer-modified-p] 3)) subst-char-in-region 10 13] 10))

(defun hide-entry nil "Hide the text directly following this heading." (interactive) (byte-code "����`� �`�#)�" [nil flag-lines-in-region next-heading-preface 13] 6))

(defun show-entry nil "Show the text directly following this heading." (interactive) (byte-code "����`� �`�#)�" [nil flag-lines-in-region next-heading-preface 10] 6))

(defun hide-text nil "Hide all of buffer except headings." (interactive) (byte-code "���ed\"�" [nil hide-region-text] 3))

(defun hide-region-text (start end) "Hide all text lines in the region, but not headings." (byte-code "���	\"�eb�m?�) �`� �`�#����!�# ɂ$ �!��
 ))�" [start end narrow-to-region flag-lines-in-region next-heading-preface 13 forward-char looking-at "[
][
]" 2 1] 12))

(defun show-all nil "Show all of the text in the buffer." (interactive) (byte-code "���ed�#�" [nil flag-lines-in-region 10] 4))

(defun hide-subtree nil "Hide everything after this heading at deeper levels." (interactive) (byte-code "����!�" [nil flag-subtree 13] 3))

(defun hide-leaves nil "Hide all text after this heading at deeper levels." (interactive) (byte-code "���`� �`\"�" [nil hide-region-text end-of-subtree] 5))

(defun show-subtree nil "Show everything after this heading at deeper levels." (interactive) (byte-code "����!�" [nil flag-subtree 10] 3))

(defun flag-subtree (flag) (byte-code "��`� �`#)�" [flag flag-lines-in-region end-of-subtree] 6))

(defun end-of-subtree nil (byte-code "� �`
� m?� 	� � V�$ ��� ��
 ���!�h�>�5 ��!�6 �+�" [odot first t level nil beginning-of-line outline-level next-heading forward-char -1 (10 13)] 16))

(defun show-branches nil "Show all subheadings of this heading, but not their text." (interactive) (byte-code "����!�" [nil show-children 1000] 3))

(defun show-children (&optional level) "Show all direct subheadings of this heading." (interactive "p") (byte-code "�	 É���� �� \\���`� �`T\"�eb�m?�, � �m?�[ � X�V �`T��!�h�>�J ��!�K �`	�#))�W �\" ))�" [level end nil 1 beginning-of-line outline-level narrow-to-region end-of-subtree next-heading forward-char -1 (10 13) flag-lines-in-region 10] 24))
